<h1>GotoFrame2</h1>

<p>The GotoFrame2 action instructs the player to go to the named or numbered 
frame in the current movie's main time-line. It extends the functionality 
provided by the GotoFrame action by allowing the name of a frame, previously 
assigned using the FrameLabel instruction, to be specified.</p>

<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top"><a name="ActionType">Type</a></td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">8</td>
<td>Identifies the action when it is encoded.</td>
</tr>

<tr>
<td nowrap valign="top"><a name="ActionLength">Length</a></td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>The number of bytes in the rest of the encoded action. The total number of
bytes in the encoded action is Length+3.</td>
</tr>

<tr>
<td nowrap valign="top">unused</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">6</td>
<td>Unused. Set to zero.</td>
</tr>

<tr>
<td nowrap valign="top">hasFrameOffset</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">1</td>
<td>Unused. Set to zero.</td>
</tr>

<tr>
<td nowrap valign="top">play</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">1</td>
<td>A boolean flag indicating whether the Flash Player should start playing the 
frame as soon as it is loaded.</td>
</tr>

<tr>
<td nowrap valign="top">frameOffset</td>
<<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>An offset added to the frame number of the stack to generate the final frame 
number that the timeline should move to.</td>
</tr>

</table>

<p>Up to Flash Version 4, movies contained a single sequence of 65536 frames. In Flash 5 the 
concept of Scenes was added which allowed movies to contain 'pages' of frames. 
GotoFrame2 contains a frameOffset attribute which allows the frames in each scene to be referenced by 
its 'logical' number. The frameOffset for a given scene is added to the frame number to 
generate the 'physical' page number.</p>

<p>GotoFrame2 is a stack-based action. The name or number of the frame is pushed onto the 
stack before the GotoFrame2 action is executed. If a frameOffset is specified it is added 
to the number of the frame identified by the stack arguments to give the final frame number. 
Whether the movie starts playing the frame is controlled by the boolean attribute, <i>play</i>. 
When set to true the movie starts playing the frame as soon as it has been loaded by the Flash 
Player.</p>

<h2>History</h2>

<p>GotoFrame2 is an instruction for representing the ActionGotoFrame2 action of the Macromedia 
Flash (SWF) File Format Specification. It  was introduced in Flash 4 and supersedes the GotoFrame 
action. In Flash 5 the frameOffset attribute was added which allows movies to be divided into a 
series of 'pages'.</p>
